import React, { Component } from 'react'

export default class App extends Component {
  clickHander (event) {
    event.preventDefault()
  }
  render() {
    return (
      <div>
        {/* 不能通过return false 来阻止默认行为 */}
        {/* <a href="https://www.baidu.com" onclick="return false">百度</a> */}
        <a href="https://www.jd.com" onClick = { this.clickHander }>京东</a>
      </div>
    )
  }
}
